<template>
  <v-app>
    <!-- <v-toolbar app>
      <v-toolbar-title class="headline text-uppercase" @click="gotoMainPage">
        <span>铪星</span>
        <span class="font-weight-light">分类帮</span>
      </v-toolbar-title>
      <v-spacer></v-spacer>
      <v-btn flat icon color="gray" @click="camera">
        <v-icon>camera_alt</v-icon>
      </v-btn>
    </v-toolbar> -->
    <v-content>
      <router-view></router-view>
    </v-content>
    <div class="vAlert">
      <v-alert :value="alertShow" :type="alertType" :dismissible="true">
        {{alertText}}
      </v-alert>
    </div>
  </v-app>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'App',
  components: {
  },
  data () {
    return {
      geolocation: ''
    }
  },
  methods: {
    // isWeChat () {
    //   let ua = window.navigator.userAgent.toLowerCase();
    //   if (ua.match(/MicroMessenger/i) == 'micromessenger') {
    //     return true;
    //   } else {
    //     return false;
    //   }
    // }
  },
  computed: {
    ...mapState(['alertShow','alertType','alertText'])
  }
}
</script>
<style lang="less" scoped>
.vAlert {
  position: fixed;
  z-index: 9999;
  width: 100%;
  top: 50%;
}
</style>
